<!-- 取色器 -->
<template>
  <pick-colors v-model:value="value" class="picker" :zIndex="zIndex" />
</template>
<script setup lang="ts">
import PickColors from 'vue-pick-colors';

const props = withDefaults(
  // 参数说明
  defineProps<{
    color?: string;
    zIndex?: number;
  }>(),
  {
    zIndex: 9999
    // color: '#eee'
  }
);
const emit = defineEmits(['update:color', 'change']);
const value = computed({
  get: () => props.color,
  set: (val) => {
    emit('update:color', val);
    emit('change');
  }
});
</script>
<style scoped lang="less">
.picker {
}
</style>
